<li th:classappend="${#httpServletRequest.requestURI.startsWith('/dashboard/weblinks')} ? 'active' : ''">
    <a href="/dashboard/weblinks">网站链接管理</a>
</li>
<li th:classappend="${#httpServletRequest.requestURI.startsWith('/dashboard/link-categories')} ? 'active' : ''">
    <a href="/dashboard/link-categories">网站分类管理</a>
</li> 